import React, { Fragment } from 'react';
import Navigation from './component/Navigation.jsx';

const Setting = React.lazy(() => import(/* webpackChunkName: "business/Setting" */ './page/setting/Setting.jsx'));
const PersonnelSetting = React.lazy(() => import(/* webpackChunkName: "business/PersonnelSetting" */ './page/setting/PersonnelSetting.jsx'));
const Statistics = React.lazy(() => import(/* webpackChunkName: "business/Statistics" */ './page/statistics/Statistics.jsx'));

const RouterConfig = [
    {
        path: '/statistics',
        exact: true,
        render: (props) => <Fragment><Statistics {...props} /><Navigation {...props} /></Fragment>
    },
    {
        path: '/setting',
        children: [
            {
                path: '/setting',
                exact: true,
                render: (props) => <Fragment><Setting {...props} /><Navigation {...props} /></Fragment>,
            },
            {
                path: '/setting/personnel_setting',
                exact: true,
                component: PersonnelSetting
            }
        ]
    }
];
export default RouterConfig;
